<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHousehold extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('household', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('house_number')->comment('门排号');
            $table->string('floor_don')->comment('栋数');
            $table->string('floor')->comment('所在楼层');
            $table->string('floor_number')->comment('所在楼层 号数');
            $table->string('unit')->comment('单元');
            $table->integer('unit_id')->comment('所属单元id');
            $table->string('water_number')->nullable()->comment('水表编号');
            $table->string('gas_number')->nullable()->comment('燃气表编号');
            $table->string('electric_number')->nullable()->comment('电表编号');
            $table->string('community_id')->nullable()->comment('小区id');
            $table->string('owner_name')->nullable()->comment('业主姓名');
            $table->string('door_number')->nullable()->comment('门牌号 简写 用作查询');
            $table->string('owner_phone')->nullable()->comment('业主电话');
            $table->string('title_number')->nullable()->comment('产权号');
            $table->string('area')->nullable()->comment('面积');
            $table->string('number_residents')->nullable()->comment('居住人数');
            $table->string('status')->nullable()->comment('房屋状态  1 自住 2 闲置 3 装修 4 出租');
            $table->string('renter_name')->nullable()->comment('租客姓名');
            $table->string('tenant_phone')->nullable()->comment('租客电话');
            $table->string('lease_term')->nullable()->comment('租期');
            $table->string('just_idk')->nullable()->comment('租客身份证正面');
            $table->string('back_idk')->nullable()->comment('租客身份证反面');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('household');
    }
}
